package com.own.component.util.excel.util.write.style.item;

import com.own.component.util.excel.util.write.style.base.AbstractStyleFunction;
import org.apache.poi.ss.usermodel.CellStyle;

/**
 * StyleItemWrapText
 *
 * @author chenxueli
 * @date 2023-05-11 14:18:00
 */
public class StyleItemWrapText extends AbstractStyleFunction<Boolean> {

    public static final StyleItemWrapText TRUE = new StyleItemWrapText();
    public static final StyleItemWrapText FALSE = new StyleItemWrapText(false);

    private StyleItemWrapText() {
        super(true);
    }

    private StyleItemWrapText(Boolean item) {
        super(item);
    }

    /**
     * 使用样式
     *
     * @param style 样式
     */
    @Override
    public void apply(CellStyle style) {
        style.setWrapText(super.getItem());
    }

}
